//
//  Slider.swift
//  MoyoungCommon
//
//  Created by 李然 on 2022/12/17.
//

import UIKit

open class Slider: UISlider {

    public var attributeKey = ""

    public func setupWithAttributes(attributes: [String: Any], attrKey: String) {
        let attr = attributes[attrKey] as! [String: Any]
        self.minimumValue = Float((attr[kCIAttributeSliderMin]) as! CGFloat)
        self.maximumValue = Float((attr[kCIAttributeSliderMax]) as! CGFloat)
        self.value = Float(attr[kCIAttributeDefault] as! CGFloat)
        self.attributeKey = attrKey
    }

    open override func layoutSubviews() {
        super.layoutSubviews()
        
    }
}
